<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
  <head>
    <th:block th:replace="~{/_include/header}" />
    <meta name="page-help" content="https://getrebuild.com/docs/admin/integration-aibot" />
    <title>[[${bundle.L('AI 助手')}]]</title>
  </head>
  <body>
    <div class="rb-wrapper rb-fixed-sidebar rb-collapsible-sidebar rb-collapsible-sidebar-hide-logo rb-color-header" th:classappend="${sideCollapsedClazz}">
      <th:block th:replace="~{/_include/nav-top}" />
      <th:block th:replace="~{/_include/nav-left-admin(active='integration-aibot')}" />
      <div class="rb-content">
        <div class="main-content container-fluid syscfg">
          <div class="row">
            <div class="col-lg-9 col-12">
              <div class="card">
                <div class="card-header pb-1">
                  [[${bundle.L('AI 助手')}]]
                  <a href="###" class="float-right J_edit"><i class="icon zmdi zmdi-edit"></i> [[${bundle.L('修改')}]]</a>
                  <a href="###" class="float-right J_save hide"><i class="icon zmdi zmdi-check text-bold"></i> [[${bundle.L('保存')}]]</a>
                </div>
                <div class="card-body">
                  <h5>[[${bundle.L('基础配置')}]]</h5>
                  <table class="table">
                    <tbody>
                      <tr>
                        <td width="40%">DeepSeek URL</td>
                        <td data-id="AibotDSUrl" th:data-value="${AibotDSUrl ?:''}">[[${AibotDSUrl ?:bundle.L('默认')}]]</td>
                      </tr>
                      <tr>
                        <td>DeepSeek API key</td>
                        <td data-id="AibotDSSecret" th:data-value="${AibotDSSecret ?:''}">[[${AibotDSSecret ?:bundle.L('未设置')}]]</td>
                      </tr>
                    </tbody>
                  </table>
                  <h5>[[${bundle.L('提示词')}]]</h5>
                  <table class="table">
                    <tbody>
                      <tr>
                        <td width="40%">[[${bundle.L('默认提示词')}]]</td>
                        <td data-id="AibotBasePrompt" th:data-value="${AibotBasePrompt ?:''}" data-optional="true">[[${AibotBasePrompt ?:bundle.L('无')}]]</td>
                      </tr>
                    </tbody>
                  </table>
                  <div class="edit-footer">
                    <button class="btn btn-link" type="button">[[${bundle.L('取消')}]]</button>
                    <div class="btn-group">
                      <button class="btn btn-primary" type="button">[[${bundle.L('保存')}]]</button>
                      <button class="btn btn-primary dropdown-toggle w-auto" type="button" data-toggle="dropdown"><i class="icon zmdi zmdi-chevron-down"></i></button>
                      <div class="dropdown-menu dropdown-menu-primary dropdown-menu-right">
                        <a class="dropdown-item J_clear">[[${bundle.L('清空配置')}]]</a>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <div class="col-lg-3 col-12"></div>
          </div>
        </div>
      </div>
    </div>
    <th:block th:replace="~{/_include/footer}" />
    <script th:src="@{/assets/js/admin/syscfg.js}" type="text/babel"></script>
    <script type="text/babel">
      useEditComp = function (name) {
        if ('AibotBasePrompt' === name) {
          return <textarea name={name} className="form-control form-control-sm row2x" maxLength="1024" />
        }
      }
    </script>
  </body>
</html>
